﻿using com.fmtx.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

[HandleError]
public class BaseController : Controller
{
    //
    // GET: /Base/
    protected UserInfo userInfo { get; private set; }

    #region 构造方法
    /// <summary>
    /// 构造方法
    /// </summary>
    protected BaseController()
    {
        userInfo = LoginModel.User;
    }
    #endregion

    /// <summary>
    /// 是否是管理员
    /// </summary>
    /// <returns></returns>
    protected bool IsManager
    {
        get {
            return userInfo.IsSystem;
        }
    }

    public ActionResult Error()
    {
        return View();
    }

    public ActionResult Error(string msg)
    {
        HandleErrorInfo ei = new HandleErrorInfo(new Exception(msg),RouteData.Values["controller"].ToString(),RouteData.Values["action"].ToString());
        return View();
    }

    public ActionResult ErrorInfo(string msg)
    {
        return View();
    }

}

